Field of the Invention
Embodiments of the present invention relate generally to graphics processing and, more specifically, to a technique for performing variable width data compression using a palette of encodings.
Description of the Related Art
In computer systems, in general, and in graphics processing units (GPUs), in particular, evolving technology affords manufacturers the ability to produce processors with increasing density that process data with increasing speed and efficiency. The process of retrieving data from dynamic random access memory (DRAM) into the processor and storing processed data back into DRAM may impose a limitation on achieving maximum benefit from improving technology. Accordingly, efforts to reduce the amount of bandwidth required may lead to more effective processing systems.
Compression algorithms involve encoding the information contained in a stream of digital data in a manner that results in fewer data bits than the original data stream. Fewer data bits results in reduced bandwidth requirements for data transmission and reduced memory capacity requirements. Many compression algorithms exist.
An effective technique for video data compression is known as variable-width differential compression (VDC). VDC is aimed at video data structures composed of 8-bit channels for red, blue, and green in a picture element, or pixel. An additional 8-bit channel is included for a characteristic known as alpha. Alpha is a number that represents the transparency of a pixel, as opposed to purely the color. This type of data structure is termed as RGBA8.
Assuming RGBA8 data, VDC first de-correlates the red and blue channels by computing the differences R-G, designated R′, and B-G, designated B′. This results in six channels to encode: R, R′, B, B′, G, and A. Then for each channel, VDC computes the difference between the channel data and an anchor value. The anchor is encoded as a full 8-bit value. The bit lengths of the computed differences are then encoded as a 3-bit value for each pair of channels. The final compressed size is the sum of the encoded channels G, A, and either R and B or R′ and B′. VDC has an acceptable success rate at two-to-one compression.
However, VDC has a limited success rate with higher compression ratios, such as four-to-one compression. An average compression ratio of four-to-one could greatly reduce bandwidth to DRAM, thereby improving computer systems that rely on efficient memory access, such as GPUs.
As the foregoing illustrates, what is needed in the art is a data compression technique with an increased compression ratio.